package com.zwh.modules.easyexceldemo;

import java.util.Date;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;

/**
 * @author monkey
 * @date 2021/3/4 12:56
 **/
public class StudentExportDto {

    @ExcelProperty(value = {"学生信息", "姓名"} ,index = 0)
    private String name;

    @ExcelProperty(value = {"学生信息", "年龄"} ,index = 1)
    private Integer age;

    @DateTimeFormat(value="yyyy-MM")
    @ExcelProperty(value = {"学生信息", "出生年月"} ,index = 2)
    private Date birthday;

    @NumberFormat(value="#.00")
    @ExcelProperty(value = {"学生信息", "数学分数"} ,index = 3)
    private Double mathScore;

    @NumberFormat(value="#.00")
    @ExcelProperty(value = {"学生信息", "语文分数"} ,index = 4)
    private Double chineseScore;

    @NumberFormat(value="#.00")
    @ExcelProperty(value = {"学生信息", "平均分数"} ,index = 5)
    private Double averageScore;

    public StudentExportDto(String name, Integer age, Date birthday, Double mathScore, Double chineseScore, Double averageScore) {
        this.name = name;
        this.age = age;
        this.birthday = birthday;
        this.mathScore = mathScore;
        this.chineseScore = chineseScore;
        this.averageScore = averageScore;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Double getMathScore() {
        return mathScore;
    }

    public void setMathScore(Double mathScore) {
        this.mathScore = mathScore;
    }

    public Double getChineseScore() {
        return chineseScore;
    }

    public void setChineseScore(Double chineseScore) {
        this.chineseScore = chineseScore;
    }

    public Double getAverageScore() {
        return averageScore;
    }

    public void setAverageScore(Double averageScore) {
        this.averageScore = averageScore;
    }
}
